package chapter08;

import javax.annotation.Resource;

/**
 * Created by V5470-I5 on 2016/3/31.
 */
/*public class AutoClosableDemo {
    public static void mian (String[] args){
        try(Resource res = new Resource()){
            res.doSome();
        }catch (Exception ex){
            ex.printStackTrace();
        }
    }
}
class Resource implements AutoCloseable{
    void doSome(){
        System.out.println("做一些事");
    }
    @Override
    public void close() throws Exception{
        System.out.println("资源被关闭");
    }
}
*/